home *** CD-ROM | disk | FTP | other *** search
/ Chip 2006 December / chip-cd_2006_12.zip / 12 / Pakiet internetowy / Stacje TV i radiowe (odsluchiwanie i rippowanie) / Streamripper winamp5 1.61.27 / srwa5-1.61.27.exe / $1 / fake_external_metadata.pl next >
Perl Script  |  2005-11-11  |  1KB  |  35 lines

  1. #! /usr/bin/perl
  2. ###########################################################################
  3. # This is an external script that I use for testing streamripper's 
  4. # external program interface.  It implements the following:
  5. #
  6. #   1) Generates (random) title and artist information
  7. #   2) Sends the information to streamripper
  8. # To invoke the script, do this:
  9. #    streamripper URL -E "perl fake_external_metadata.pl"
  10. #
  11. # This script is in the public domain. You are free to use, modify and 
  12. # redistribute without restrictions.
  13. ###########################################################################
  14.  
  15. $repno = 4;
  16.  
  17. $ts = "AAA";
  18. $as = "001";
  19. $title = "TITLE=$ts\n";
  20. $artist = "ARTIST=$as\n";
  21. while (1) {
  22.     if ($repno-- < 0) {
  23.     $repno = 4;
  24.     $as++;
  25.     $ts++;
  26.     $title = "TITLE=$ts\n";
  27.     $artist = "ARTIST=$as\n";
  28.     }
  29.     $end_of_record = ".\n";
  30.     $meta_data = $title . $artist . $end_of_record;
  31.     syswrite (STDOUT, $meta_data, length($meta_data));
  32.     sleep (10);
  33. }
  34.